<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Login</title>
    <style type="text/css">
        body {
            background-color: azure;
            position: relative;
        }

        h1 {
            text-align: center;
        }

        form {
            text-align: center;
            position: relative;
        }

        input[type=submit] {
            width: 100px;
            height: 30px;
            background-color: rgb(244, 244, 244);
            border: none;
            margin-left: 120px;
        }

        div {
            margin-left: 100px;
        }

        a {
            margin-right: 520px;
            font-size: 12px;
            color: cornflowerblue;
        }
    </style>
</head>
<body>
<h1>登录</h1>

<div th:if="${error}">
    Bad credentials.
</div>

<form method="POST" th:action="@{/login}" id="loginForm">

    <br/>
    <label for="username">用户名: </label>
    <input type="text" name="username" id="username"/><br/></center>
    <br/>
    <label for="password">密&ensp;&ensp;码: </label>
    <input type="password" name="password" id="password"/>
    <br/>
    <br/>

    <input type="submit" value="Login"/>
    <br/>
</form>
<br/>
<a th:href="@{/register1}" id="register" style="display: block;text-align:right;">没有账号，我要注册</a>

</body>
</html>